package top.yxqz.filter.dome;

import javax.servlet.FilterConfig;
import javax.servlet.ServletContext;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;

/**
 * @author Mr.余
 * @date 2022/12/5
 * @package top.yxqz.filter.dome
 * 自定义拦截器配置信息
 */
public class MyFilterConfig implements FilterConfig {
    @Override
    public String getFilterName() {
        return null;
    }

    @Override
    public ServletContext getServletContext() {
        return null;
    }

    @Override
    public String getInitParameter(String s) {
        Map<String, String> map = new HashMap<>();
        map.put("username", "王五");
        String value = map.get(s);
        return value;
    }

    @Override
    public Enumeration<String> getInitParameterNames() {
        return null;
    }
}
